<?php
Route::group(['middleware' => 'web', 'prefix' => 'shop', 'namespace' => 'Modules\Shop\Http\Controllers'], function() {
    //博客展示页路由
    Route::get('/blog', 'HomeController@blog')->name('blog');
    //博客文章页路由
    Route::get('/single/{id}', 'HomeController@single')->name('single');
    //预留内容页路由
    Route::get('/page', 'HomeController@page')->name('page');
    //文章展示页路由
    Route::get('/work', 'HomeController@work')->name('work');
    Route::get('/list/{cid}', 'HomeController@list')->name('list');
    //文章页路由
    Route::get('/project/{id}', 'HomeController@project')->name('project');
    //联系我路由
    Route::get('/contact', 'HomeController@contact')->name('contact');
    //其他预留页路由
    Route::get('/other', 'HomeController@other')->name('other');
    //保存路由
    Route::post('/stores', 'HomeController@store')->name('stores');
});
Route::group(['middleware' => ['web','auth:admin'], 'prefix' => 'shop', 'namespace' => 'Modules\Shop\Http\Controllers'], function()
{
    Route::get('/', 'ShopController@index')->middleware("permission:admin");
    //分类管理资源路由
    Route::resource('/category','CategoryController')->middleware("permission:admin,resource");
    //文章管理系统
    Route::resource('article', 'ArticleController')->middleware("permission:admin,resource");
    //留言管理路由
    Route::resource('comment','CommentController')->middleware("permission:admin,resource");
    //留言通过路由
    Route::get('updates/{comment}','CommentController@update')->name('updates')->middleware("permission:admin");
    //留言下架路由
    Route::get('todel/{comment}','CommentController@todel')->name('todel')->middleware("permission:admin");
});